package itheima.zuoye.Test7;

import java.math.BigDecimal;

public abstract class Cad {
    private String number;
    private String name;
    private String phonenumber;
    private double money;

    public Cad() {
    }

    public Cad(String number, String name, String phonenumber, double money) {
        this.number = number;
        this.name = name;
        this.phonenumber = phonenumber;
        this.money = money;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhonenumber() {
        return phonenumber;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "Cad{" +
                "number='" + number + '\'' +
                ", name='" + name + '\'' +
                ", phonenumber='" + phonenumber + '\'' +
                ", money=" + money +
                '}';
    }
    public abstract BigDecimal pay(BigDecimal amount);
}
